import request from '@/utils/request'

const prefixUrl = '/api/logicFlow'
/**
 * 添加（编辑）工作流
 * @param {*} data
 * @returns
 */
export function addFlow(data) {
  return request({
    url: prefixUrl + '/addFlow',
    method: 'post',
    data
  })
}

/**
 * 查询工作流
 * @param {*} data
 * @returns
 */
export function infoFlow(data) {
  return request({
    url: prefixUrl + '/infoFlow',
    method: 'post',
    data
  })
}

/**
 * 删除工作流
 * @param {*} data
 * @returns
 */
export function deleteFlow(data) {
  return request({
    url: prefixUrl + '/deleteFlow',
    method: 'post',
    data
  })
}

/**
 * 获取工作流定义
 * @param {*} data
 * @returns
 */
export function getDeployList(data) {
  return request({
    url: prefixUrl + '/getDeployList',
    method: 'post',
    data
  })
}

/**
 * 工作流实例
 * @returns
 */
export function flowRun(data) {
  return request({
    url: prefixUrl + '/deploymentRun',
    method: 'post',
    data
  })
}
